How is the best way to trigger an e-stop within Mach, so that the Mach Reset button has to be clicked to reactivate things?
On my other non-Kflop lathe, this simply happens whenever an E-stop is triggered, as there's nothing complicated needing done, so Mach simply gets notified, I fix the problem, then hit the Reset button.
However on my new lathe, I need to monitor a few inputs, and then be able to trigger an E-Stop like condition (probably best to call it a soft E-Stop), which then requires the fault to be cleared before a Reset. One use is for the tool changer, which if it fails to move and lock correctly, I'd like to stop all movement and trigger a "soft" E-Stop without killing power. That way I still have power to try reindexing the tool changer.
Also if a Servo drive faults out, I'd like to do a similar thing.
I did consider adding the faults into the main E-Stop circuit to kill power, but the servo drives are interlinked so if one faults, a stop signal gets issued to stop them quicker, however I still need to notify Mach to stop.
There is still a physical E-Stop circuit that kills all movement power if needed, and it has it's status fed back to a KFlop input.
The only option I can think of without relying on a Mach Brain, is map the physical and 'soft' E-Stop bits to a virtual bit which the KFlop updates, then have that virtual bit set as the Mach E-Stop input. Is this the best way, or is there some other way to handle this?
I'll be programing the KFlop to handle the actual stopping, as I don't want to rely on waiting for Mach to respond and stop things.
The other quick question I'm sure I've missed somewhere, is how do I get a variable value within the KFlop to display in a Mach DRO?
I simply want to display the Toolchanger position within Mach, which is stored as an Int within the KFlop (after being read via Modbus from the PLC). I can add a DRO within Mach, but is this something I need to add via a Notify Plugin?
On a side note, I'm managing the programming for the KFlop reasonably well. I had the lathe moving for the first time under Mach control last night, it's just I'm struggling a bit with understanding how the KFlop and Mach interact, and figuring out best how to acheive what I'd like.
Thanks
Moray